#ifndef APPLICATIONS_FSMC_FSMC_H_
#define APPLICATIONS_FSMC_FSMC_H_

#include <rtthread.h>

/**
 * @brief Flexible Static Memory Controller
 * 可变静态存储控制器
 */
class FSMC
{
public:
    FSMC();
    virtual ~FSMC();

    static void resetSram();
    void transData2Fsmc(rt_ubase_t num,uint32_t startAddr);
    static void readFsmc(unsigned int add,unsigned short int *num);
    static void writeFsmc(unsigned int add,unsigned short int num);
    static void writeReg(unsigned int addr,unsigned int bit,unsigned int flag);

private:
    static void init();

};

#endif /* APPLICATIONS_FSMC_FSMC_H_ */
